\(\int \cot ^6(c+d x) (a+b \sin (c+d x))^2 \, dx\) [1249]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 202 \[ \int \cot ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=-a^2 x+\frac {5 b^2 x}{2}-\frac {15 a b \text {arctanh}(\cos (c+d x))}{4 d}+\frac {15 a b \cos (c+d x)}{4 d}-\frac {a^2 \cot (c+d x)}{d}+\frac {5 b^2 \cot (c+d x)}{2 d}+\frac {5 a b \cos (c+d x) \cot ^2(c+d x)}{4 d}+\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {5 b^2 \cot ^3(c+d x)}{6 d}+\frac {b^2 \cos ^2(c+d x) \cot ^3(c+d x)}{2 d}-\frac {a b \cos (c+d x) \cot ^4(c+d x)}{2 d}-\frac {a^2 \cot ^5(c+d x)}{5 d} \]

[Out]

-a^2*x+5/2*b^2*x-15/4*a*b*arctanh(cos(d*x+c))/d+15/4*a*b*cos(d*x+c)/d-a^2*cot(d*x+c)/d+5/2*b^2*cot(d*x+c)/d+5/
4*a*b*cos(d*x+c)*cot(d*x+c)^2/d+1/3*a^2*cot(d*x+c)^3/d-5/6*b^2*cot(d*x+c)^3/d+1/2*b^2*cos(d*x+c)^2*cot(d*x+c)^
3/d-1/2*a*b*cos(d*x+c)*cot(d*x+c)^4/d-1/5*a^2*cot(d*x+c)^5/d

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.476, Rules used = {2801, 2671, 294, 308, 209, 2672, 327, 212, 3554, 8} \[ \int \cot ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {a^2 \cot (c+d x)}{d}-a^2 x-\frac {15 a b \text {arctanh}(\cos (c+d x))}{4 d}+\frac {15 a b \cos (c+d x)}{4 d}-\frac {a b \cos (c+d x) \cot ^4(c+d x)}{2 d}+\frac {5 a b \cos (c+d x) \cot ^2(c+d x)}{4 d}-\frac {5 b^2 \cot ^3(c+d x)}{6 d}+\frac {5 b^2 \cot (c+d x)}{2 d}+\frac {b^2 \cos ^2(c+d x) \cot ^3(c+d x)}{2 d}+\frac {5 b^2 x}{2} \]

[In]

Int[Cot[c + d*x]^6*(a + b*Sin[c + d*x])^2,x]

[Out]

-(a^2*x) + (5*b^2*x)/2 - (15*a*b*ArcTanh[Cos[c + d*x]])/(4*d) + (15*a*b*Cos[c + d*x])/(4*d) - (a^2*Cot[c + d*x
])/d + (5*b^2*Cot[c + d*x])/(2*d) + (5*a*b*Cos[c + d*x]*Cot[c + d*x]^2)/(4*d) + (a^2*Cot[c + d*x]^3)/(3*d) - (
5*b^2*Cot[c + d*x]^3)/(6*d) + (b^2*Cos[c + d*x]^2*Cot[c + d*x]^3)/(2*d) - (a*b*Cos[c + d*x]*Cot[c + d*x]^4)/(2
*d) - (a^2*Cot[c + d*x]^5)/(5*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 294

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^
n)^(p + 1)/(b*n*(p + 1))), x] - Dist[c^n*((m - n + 1)/(b*n*(p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 308

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2671

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> With[{ff = FreeFactors[Ta
n[e + f*x], x]}, Dist[b*(ff/f), Subst[Int[(ff*x)^(m + n)/(b^2 + ff^2*x^2)^(m/2 + 1), x], x, b*(Tan[e + f*x]/ff
)], x]] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2]

Rule 2672

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, a*(Sin[e + f*x]/ff)
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]

Rule 2801

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.), x_Symbol] :> Int[Expan
dIntegrand[(g*Tan[e + f*x])^p, (a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && NeQ[a^2 - b^2
, 0] && IGtQ[m, 0]

Rule 3554

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rubi steps \begin{align*} \text {integral}& = \int \left (b^2 \cos ^2(c+d x) \cot ^4(c+d x)+2 a b \cos (c+d x) \cot ^5(c+d x)+a^2 \cot ^6(c+d x)\right ) \, dx \\ & = a^2 \int \cot ^6(c+d x) \, dx+(2 a b) \int \cos (c+d x) \cot ^5(c+d x) \, dx+b^2 \int \cos ^2(c+d x) \cot ^4(c+d x) \, dx \\ & = -\frac {a^2 \cot ^5(c+d x)}{5 d}-a^2 \int \cot ^4(c+d x) \, dx-\frac {(2 a b) \text {Subst}\left (\int \frac {x^6}{\left (1-x^2\right )^3} \, dx,x,\cos (c+d x)\right )}{d}-\frac {b^2 \text {Subst}\left (\int \frac {x^6}{\left (1+x^2\right )^2} \, dx,x,\cot (c+d x)\right )}{d} \\ & = \frac {a^2 \cot ^3(c+d x)}{3 d}+\frac {b^2 \cos ^2(c+d x) \cot ^3(c+d x)}{2 d}-\frac {a b \cos (c+d x) \cot ^4(c+d x)}{2 d}-\frac {a^2 \cot ^5(c+d x)}{5 d}+a^2 \int \cot ^2(c+d x) \, dx+\frac {(5 a b) \text {Subst}\left (\int \frac {x^4}{\left (1-x^2\right )^2} \, dx,x,\cos (c+d x)\right )}{2 d}-\frac {\left (5 b^2\right ) \text {Subst}\left (\int \frac {x^4}{1+x^2} \, dx,x,\cot (c+d x)\right )}{2 d} \\ & = -\frac {a^2 \cot (c+d x)}{d}+\frac {5 a b \cos (c+d x) \cot ^2(c+d x)}{4 d}+\frac {a^2 \cot ^3(c+d x)}{3 d}+\frac {b^2 \cos ^2(c+d x) \cot ^3(c+d x)}{2 d}-\frac {a b \cos (c+d x) \cot ^4(c+d x)}{2 d}-\frac {a^2 \cot ^5(c+d x)}{5 d}-a^2 \int 1 \, dx-\frac {(15 a b) \text {Subst}\left (\int \frac {x^2}{1-x^2} \, dx,x,\cos (c+d x)\right )}{4 d}-\frac {\left (5 b^2\right ) \text {Subst}\left (\int \left (-1+x^2+\frac {1}{1+x^2}\right ) \, dx,x,\cot (c+d x)\right )}{2 d} \\ & = -a^2 x+\frac {15 a b \cos (c+d x)}{4 d}-\frac {a^2 \cot (c+d x)}{d}+\frac {5 b^2 \cot (c+d x)}{2 d}+\frac {5 a b \cos (c+d x) \cot ^2(c+d x)}{4 d}+\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {5 b^2 \cot ^3(c+d x)}{6 d}+\frac {b^2 \cos ^2(c+d x) \cot ^3(c+d x)}{2 d}-\frac {a b \cos (c+d x) \cot ^4(c+d x)}{2 d}-\frac {a^2 \cot ^5(c+d x)}{5 d}-\frac {(15 a b) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (c+d x)\right )}{4 d}-\frac {\left (5 b^2\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\cot (c+d x)\right )}{2 d} \\ & = -a^2 x+\frac {5 b^2 x}{2}-\frac {15 a b \text {arctanh}(\cos (c+d x))}{4 d}+\frac {15 a b \cos (c+d x)}{4 d}-\frac {a^2 \cot (c+d x)}{d}+\frac {5 b^2 \cot (c+d x)}{2 d}+\frac {5 a b \cos (c+d x) \cot ^2(c+d x)}{4 d}+\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {5 b^2 \cot ^3(c+d x)}{6 d}+\frac {b^2 \cos ^2(c+d x) \cot ^3(c+d x)}{2 d}-\frac {a b \cos (c+d x) \cot ^4(c+d x)}{2 d}-\frac {a^2 \cot ^5(c+d x)}{5 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.72 (sec) , antiderivative size = 351, normalized size of antiderivative = 1.74 \[ \int \cot ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {-480 a^2 c+1200 b^2 c-480 a^2 d x+1200 b^2 d x+960 a b \cos (c+d x)+\left (-368 a^2+560 b^2\right ) \cot \left (\frac {1}{2} (c+d x)\right )+270 a b \csc ^2\left (\frac {1}{2} (c+d x)\right )-15 a b \csc ^4\left (\frac {1}{2} (c+d x)\right )-1800 a b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+1800 a b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-270 a b \sec ^2\left (\frac {1}{2} (c+d x)\right )+15 a b \sec ^4\left (\frac {1}{2} (c+d x)\right )-328 a^2 \csc ^3(c+d x) \sin ^4\left (\frac {1}{2} (c+d x)\right )+160 b^2 \csc ^3(c+d x) \sin ^4\left (\frac {1}{2} (c+d x)\right )+96 a^2 \csc ^5(c+d x) \sin ^6\left (\frac {1}{2} (c+d x)\right )+\frac {41}{2} a^2 \csc ^4\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)-10 b^2 \csc ^4\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)-\frac {3}{2} a^2 \csc ^6\left (\frac {1}{2} (c+d x)\right ) \sin (c+d x)+120 b^2 \sin (2 (c+d x))+368 a^2 \tan \left (\frac {1}{2} (c+d x)\right )-560 b^2 \tan \left (\frac {1}{2} (c+d x)\right )}{480 d} \]

[In]

Integrate[Cot[c + d*x]^6*(a + b*Sin[c + d*x])^2,x]

[Out]

(-480*a^2*c + 1200*b^2*c - 480*a^2*d*x + 1200*b^2*d*x + 960*a*b*Cos[c + d*x] + (-368*a^2 + 560*b^2)*Cot[(c + d
*x)/2] + 270*a*b*Csc[(c + d*x)/2]^2 - 15*a*b*Csc[(c + d*x)/2]^4 - 1800*a*b*Log[Cos[(c + d*x)/2]] + 1800*a*b*Lo
g[Sin[(c + d*x)/2]] - 270*a*b*Sec[(c + d*x)/2]^2 + 15*a*b*Sec[(c + d*x)/2]^4 - 328*a^2*Csc[c + d*x]^3*Sin[(c +
 d*x)/2]^4 + 160*b^2*Csc[c + d*x]^3*Sin[(c + d*x)/2]^4 + 96*a^2*Csc[c + d*x]^5*Sin[(c + d*x)/2]^6 + (41*a^2*Cs
c[(c + d*x)/2]^4*Sin[c + d*x])/2 - 10*b^2*Csc[(c + d*x)/2]^4*Sin[c + d*x] - (3*a^2*Csc[(c + d*x)/2]^6*Sin[c +
d*x])/2 + 120*b^2*Sin[2*(c + d*x)] + 368*a^2*Tan[(c + d*x)/2] - 560*b^2*Tan[(c + d*x)/2])/(480*d)

Maple [A] (verified)

Time = 0.69 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.07

method result size
derivativedivides \(\frac {a^{2} \left (-\frac {\left (\cot ^{5}\left (d x +c \right )\right )}{5}+\frac {\left (\cot ^{3}\left (d x +c \right )\right )}{3}-\cot \left (d x +c \right )-d x -c \right )+2 a b \left (-\frac {\cos ^{7}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}+\frac {3 \left (\cos ^{7}\left (d x +c \right )\right )}{8 \sin \left (d x +c \right )^{2}}+\frac {3 \left (\cos ^{5}\left (d x +c \right )\right )}{8}+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{8}+\frac {15 \cos \left (d x +c \right )}{8}+\frac {15 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+b^{2} \left (-\frac {\cos ^{7}\left (d x +c \right )}{3 \sin \left (d x +c \right )^{3}}+\frac {4 \left (\cos ^{7}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )}+\frac {4 \left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{3}+\frac {5 d x}{2}+\frac {5 c}{2}\right )}{d}\) \(216\)
default \(\frac {a^{2} \left (-\frac {\left (\cot ^{5}\left (d x +c \right )\right )}{5}+\frac {\left (\cot ^{3}\left (d x +c \right )\right )}{3}-\cot \left (d x +c \right )-d x -c \right )+2 a b \left (-\frac {\cos ^{7}\left (d x +c \right )}{4 \sin \left (d x +c \right )^{4}}+\frac {3 \left (\cos ^{7}\left (d x +c \right )\right )}{8 \sin \left (d x +c \right )^{2}}+\frac {3 \left (\cos ^{5}\left (d x +c \right )\right )}{8}+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{8}+\frac {15 \cos \left (d x +c \right )}{8}+\frac {15 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8}\right )+b^{2} \left (-\frac {\cos ^{7}\left (d x +c \right )}{3 \sin \left (d x +c \right )^{3}}+\frac {4 \left (\cos ^{7}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )}+\frac {4 \left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{3}+\frac {5 d x}{2}+\frac {5 c}{2}\right )}{d}\) \(216\)
parallelrisch \(\frac {28800 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b -23 \left (\cos \left (5 d x +5 c \right )+\frac {50 \cos \left (d x +c \right )}{23}-\frac {25 \cos \left (3 d x +3 c \right )}{23}\right ) \left (\sec ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2} \left (\csc ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+60 a b \left (\sec ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\csc ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\frac {285}{32}+\cos \left (5 d x +5 c \right )+\frac {95 \cos \left (4 d x +4 c \right )}{32}-\frac {15 \cos \left (3 d x +3 c \right )}{2}-\frac {95 \cos \left (2 d x +2 c \right )}{8}+\frac {5 \cos \left (d x +c \right )}{2}\right )+30 b^{2} \left (\sec ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\cos \left (5 d x +5 c \right )+10 \cos \left (d x +c \right )-\frac {65 \cos \left (3 d x +3 c \right )}{3}\right ) \left (\csc ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-7680 d x \left (a^{2}-\frac {5 b^{2}}{2}\right )}{7680 d}\) \(224\)
risch \(-a^{2} x +\frac {5 b^{2} x}{2}-\frac {i {\mathrm e}^{2 i \left (d x +c \right )} b^{2}}{8 d}+\frac {a b \,{\mathrm e}^{i \left (d x +c \right )}}{d}+\frac {a b \,{\mathrm e}^{-i \left (d x +c \right )}}{d}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} b^{2}}{8 d}-\frac {180 i a^{2} {\mathrm e}^{8 i \left (d x +c \right )}-180 i b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+135 a b \,{\mathrm e}^{9 i \left (d x +c \right )}-360 i a^{2} {\mathrm e}^{6 i \left (d x +c \right )}+600 i b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-150 a b \,{\mathrm e}^{7 i \left (d x +c \right )}+560 i a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-800 i b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-280 i a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+520 i b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+150 a b \,{\mathrm e}^{3 i \left (d x +c \right )}+92 i a^{2}-140 i b^{2}-135 a b \,{\mathrm e}^{i \left (d x +c \right )}}{30 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{5}}+\frac {15 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{4 d}-\frac {15 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{4 d}\) \(321\)
norman \(\frac {\left (-a^{2}+\frac {5 b^{2}}{2}\right ) x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-a^{2}+\frac {5 b^{2}}{2}\right ) x \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-2 a^{2}+5 b^{2}\right ) x \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {a^{2}}{160 d}+\frac {a^{2} \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{160 d}+\frac {\left (29 a^{2}-20 b^{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{480 d}-\frac {\left (29 a^{2}-20 b^{2}\right ) \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{480 d}-\frac {\left (59 a^{2}-200 b^{2}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{96 d}+\frac {\left (59 a^{2}-200 b^{2}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{96 d}-\frac {\left (263 a^{2}-500 b^{2}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{480 d}+\frac {\left (263 a^{2}-500 b^{2}\right ) \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{480 d}+\frac {95 a b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}+\frac {95 a b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}-\frac {a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{32 d}+\frac {7 a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}-\frac {7 a b \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}+\frac {a b \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {15 a b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}\) \(414\)

[In]

int(cos(d*x+c)^6*csc(d*x+c)^6*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^2*(-1/5*cot(d*x+c)^5+1/3*cot(d*x+c)^3-cot(d*x+c)-d*x-c)+2*a*b*(-1/4/sin(d*x+c)^4*cos(d*x+c)^7+3/8/sin(d
*x+c)^2*cos(d*x+c)^7+3/8*cos(d*x+c)^5+5/8*cos(d*x+c)^3+15/8*cos(d*x+c)+15/8*ln(csc(d*x+c)-cot(d*x+c)))+b^2*(-1
/3/sin(d*x+c)^3*cos(d*x+c)^7+4/3/sin(d*x+c)*cos(d*x+c)^7+4/3*(cos(d*x+c)^5+5/4*cos(d*x+c)^3+15/8*cos(d*x+c))*s
in(d*x+c)+5/2*d*x+5/2*c))

Fricas [A] (verification not implemented)

none

Time = 0.37 (sec) , antiderivative size = 306, normalized size of antiderivative = 1.51 \[ \int \cot ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {60 \, b^{2} \cos \left (d x + c\right )^{7} + 92 \, {\left (2 \, a^{2} - 5 \, b^{2}\right )} \cos \left (d x + c\right )^{5} - 140 \, {\left (2 \, a^{2} - 5 \, b^{2}\right )} \cos \left (d x + c\right )^{3} + 225 \, {\left (a b \cos \left (d x + c\right )^{4} - 2 \, a b \cos \left (d x + c\right )^{2} + a b\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 225 \, {\left (a b \cos \left (d x + c\right )^{4} - 2 \, a b \cos \left (d x + c\right )^{2} + a b\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 60 \, {\left (2 \, a^{2} - 5 \, b^{2}\right )} \cos \left (d x + c\right ) + 30 \, {\left (2 \, {\left (2 \, a^{2} - 5 \, b^{2}\right )} d x \cos \left (d x + c\right )^{4} - 8 \, a b \cos \left (d x + c\right )^{5} - 4 \, {\left (2 \, a^{2} - 5 \, b^{2}\right )} d x \cos \left (d x + c\right )^{2} + 25 \, a b \cos \left (d x + c\right )^{3} + 2 \, {\left (2 \, a^{2} - 5 \, b^{2}\right )} d x - 15 \, a b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{120 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )} \sin \left (d x + c\right )} \]

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^6*(a+b*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/120*(60*b^2*cos(d*x + c)^7 + 92*(2*a^2 - 5*b^2)*cos(d*x + c)^5 - 140*(2*a^2 - 5*b^2)*cos(d*x + c)^3 + 225*(
a*b*cos(d*x + c)^4 - 2*a*b*cos(d*x + c)^2 + a*b)*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 225*(a*b*cos(d*x +
 c)^4 - 2*a*b*cos(d*x + c)^2 + a*b)*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 60*(2*a^2 - 5*b^2)*cos(d*x + c
) + 30*(2*(2*a^2 - 5*b^2)*d*x*cos(d*x + c)^4 - 8*a*b*cos(d*x + c)^5 - 4*(2*a^2 - 5*b^2)*d*x*cos(d*x + c)^2 + 2
5*a*b*cos(d*x + c)^3 + 2*(2*a^2 - 5*b^2)*d*x - 15*a*b*cos(d*x + c))*sin(d*x + c))/((d*cos(d*x + c)^4 - 2*d*cos
(d*x + c)^2 + d)*sin(d*x + c))

Sympy [F(-1)]

Timed out. \[ \int \cot ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**6*csc(d*x+c)**6*(a+b*sin(d*x+c))**2,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 183, normalized size of antiderivative = 0.91 \[ \int \cot ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {8 \, {\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} - 5 \, \tan \left (d x + c\right )^{2} + 3}{\tan \left (d x + c\right )^{5}}\right )} a^{2} - 20 \, {\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} + 10 \, \tan \left (d x + c\right )^{2} - 2}{\tan \left (d x + c\right )^{5} + \tan \left (d x + c\right )^{3}}\right )} b^{2} + 15 \, a b {\left (\frac {2 \, {\left (9 \, \cos \left (d x + c\right )^{3} - 7 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - 16 \, \cos \left (d x + c\right ) + 15 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 15 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{120 \, d} \]

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^6*(a+b*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/120*(8*(15*d*x + 15*c + (15*tan(d*x + c)^4 - 5*tan(d*x + c)^2 + 3)/tan(d*x + c)^5)*a^2 - 20*(15*d*x + 15*c
+ (15*tan(d*x + c)^4 + 10*tan(d*x + c)^2 - 2)/(tan(d*x + c)^5 + tan(d*x + c)^3))*b^2 + 15*a*b*(2*(9*cos(d*x +
c)^3 - 7*cos(d*x + c))/(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1) - 16*cos(d*x + c) + 15*log(cos(d*x + c) + 1) -
15*log(cos(d*x + c) - 1)))/d

Giac [A] (verification not implemented)

none

Time = 0.41 (sec) , antiderivative size = 337, normalized size of antiderivative = 1.67 \[ \int \cot ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 15 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 35 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 20 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 240 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1800 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 330 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 540 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 240 \, {\left (2 \, a^{2} - 5 \, b^{2}\right )} {\left (d x + c\right )} - \frac {480 \, {\left (b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 4 \, a b\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}} - \frac {4110 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 330 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 540 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 240 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 35 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 20 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 15 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{480 \, d} \]

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^6*(a+b*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/480*(3*a^2*tan(1/2*d*x + 1/2*c)^5 + 15*a*b*tan(1/2*d*x + 1/2*c)^4 - 35*a^2*tan(1/2*d*x + 1/2*c)^3 + 20*b^2*t
an(1/2*d*x + 1/2*c)^3 - 240*a*b*tan(1/2*d*x + 1/2*c)^2 + 1800*a*b*log(abs(tan(1/2*d*x + 1/2*c))) + 330*a^2*tan
(1/2*d*x + 1/2*c) - 540*b^2*tan(1/2*d*x + 1/2*c) - 240*(2*a^2 - 5*b^2)*(d*x + c) - 480*(b^2*tan(1/2*d*x + 1/2*
c)^3 - 4*a*b*tan(1/2*d*x + 1/2*c)^2 - b^2*tan(1/2*d*x + 1/2*c) - 4*a*b)/(tan(1/2*d*x + 1/2*c)^2 + 1)^2 - (4110
*a*b*tan(1/2*d*x + 1/2*c)^5 + 330*a^2*tan(1/2*d*x + 1/2*c)^4 - 540*b^2*tan(1/2*d*x + 1/2*c)^4 - 240*a*b*tan(1/
2*d*x + 1/2*c)^3 - 35*a^2*tan(1/2*d*x + 1/2*c)^2 + 20*b^2*tan(1/2*d*x + 1/2*c)^2 + 15*a*b*tan(1/2*d*x + 1/2*c)
 + 3*a^2)/tan(1/2*d*x + 1/2*c)^5)/d

Mupad [B] (verification not implemented)

Time = 16.05 (sec) , antiderivative size = 888, normalized size of antiderivative = 4.40 \[ \int \cot ^6(c+d x) (a+b \sin (c+d x))^2 \, dx=\text {Too large to display} \]

[In]

int((cos(c + d*x)^6*(a + b*sin(c + d*x))^2)/sin(c + d*x)^6,x)

[Out]

((95*b^2*cos(c + d*x))/384 - (5*a^2*cos(c + d*x))/24 + (5*a^2*cos(3*c + 3*d*x))/48 - (23*a^2*cos(5*c + 5*d*x))
/240 - (163*b^2*cos(3*c + 3*d*x))/384 + (71*b^2*cos(5*c + 5*d*x))/384 - (b^2*cos(7*c + 7*d*x))/128 + (5*a^2*at
an((10*b^2*cos(c/2 + (d*x)/2) - 4*a^2*cos(c/2 + (d*x)/2) + 15*a*b*sin(c/2 + (d*x)/2))/(4*a^2*sin(c/2 + (d*x)/2
) - 10*b^2*sin(c/2 + (d*x)/2) + 15*a*b*cos(c/2 + (d*x)/2)))*sin(3*c + 3*d*x))/8 - (a^2*atan((10*b^2*cos(c/2 +
(d*x)/2) - 4*a^2*cos(c/2 + (d*x)/2) + 15*a*b*sin(c/2 + (d*x)/2))/(4*a^2*sin(c/2 + (d*x)/2) - 10*b^2*sin(c/2 +
(d*x)/2) + 15*a*b*cos(c/2 + (d*x)/2)))*sin(5*c + 5*d*x))/8 - (25*b^2*atan((10*b^2*cos(c/2 + (d*x)/2) - 4*a^2*c
os(c/2 + (d*x)/2) + 15*a*b*sin(c/2 + (d*x)/2))/(4*a^2*sin(c/2 + (d*x)/2) - 10*b^2*sin(c/2 + (d*x)/2) + 15*a*b*
cos(c/2 + (d*x)/2)))*sin(3*c + 3*d*x))/16 + (5*b^2*atan((10*b^2*cos(c/2 + (d*x)/2) - 4*a^2*cos(c/2 + (d*x)/2)
+ 15*a*b*sin(c/2 + (d*x)/2))/(4*a^2*sin(c/2 + (d*x)/2) - 10*b^2*sin(c/2 + (d*x)/2) + 15*a*b*cos(c/2 + (d*x)/2)
))*sin(5*c + 5*d*x))/16 + (5*a*b*sin(c + d*x))/4 - (5*a^2*atan((10*b^2*cos(c/2 + (d*x)/2) - 4*a^2*cos(c/2 + (d
*x)/2) + 15*a*b*sin(c/2 + (d*x)/2))/(4*a^2*sin(c/2 + (d*x)/2) - 10*b^2*sin(c/2 + (d*x)/2) + 15*a*b*cos(c/2 + (
d*x)/2)))*sin(c + d*x))/4 + (25*b^2*atan((10*b^2*cos(c/2 + (d*x)/2) - 4*a^2*cos(c/2 + (d*x)/2) + 15*a*b*sin(c/
2 + (d*x)/2))/(4*a^2*sin(c/2 + (d*x)/2) - 10*b^2*sin(c/2 + (d*x)/2) + 15*a*b*cos(c/2 + (d*x)/2)))*sin(c + d*x)
)/8 + (5*a*b*sin(2*c + 2*d*x))/8 - (5*a*b*sin(3*c + 3*d*x))/8 - (17*a*b*sin(4*c + 4*d*x))/32 + (a*b*sin(5*c +
5*d*x))/8 + (a*b*sin(6*c + 6*d*x))/16 + (75*a*b*sin(c + d*x)*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/32 -
(75*a*b*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*sin(3*c + 3*d*x))/64 + (15*a*b*log(sin(c/2 + (d*x)/2)/cos(c
/2 + (d*x)/2))*sin(5*c + 5*d*x))/64)/(d*sin(c + d*x)^5)